<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Tao
 * Date: 13-3-24
 * Time: 下午2:42
 * To change this template use File | Settings | File Templates.
 */

$link = mysql_connect("localhost","root","123456");
mysql_select_db("my_db");
mysql_query("SET NAMES UTF8");

$sql = 'select * from student';
$result = mysql_query($sql);

while($row = mysql_fetch_array($result)){

    echo($row['age']);
    echo "<br/>";
}
mysql_close($link);
?>